package com.chao.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @date 2021-06-16 17:12
 */
@RestController
@RefreshScope
@RequestMapping(value = "/config")
public class ConfigController {

    @Value("${config.info}")
    private String configInfo;

    @GetMapping(value = "/info")
    public String getInfo(){
        return "config info" + configInfo;
    }
}
